<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../build/react.js"></script>
    <script src="../build/react-dom.js"></script>
    <script src="../build/browser.min.js"></script>
</head>
<body>
    <div id="app" ></div>
    <script type="text/babel">
        //首先创建一个组件
        function MyComponent() {
            function Myevent() {
                alert("现在的时间是："+new Date().toLocaleTimeString())
            }
            return(
                <button type="button" onClick={Myevent}>Click me</button>
            )
        }
        ReactDOM.render(
            <MyComponent/>,
            document.getElementById("app")
        )

    </script>
</body>
</html>